
 <!DOCTYPE HTML>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  
    <title>小程序开发月刊第八期（20190815） | Here. There.</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=3, minimum-scale=1">
    
    <meta name="author" content="被删">
    
    <meta name="description" content="热闹的八月份来了~~">
    
    
    
    
    <link rel="alternate" href="/atom.xml" title="Here. There." type="application/atom+xml">
    
    
    <link rel="icon" href="/img/favicon.ico">
    
    
    <link rel="apple-touch-icon" href="/img/pacman.jpg">
    <link rel="apple-touch-icon-precomposed" href="/img/pacman.jpg">
    
    <link rel="stylesheet" href="/css/style.css">
    
<script type="text/javascript">
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "//hm.baidu.com/hm.js?3d902de4a19cf2bf179534ffd2dd7b7f";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script>

</head>

  <body>
    <header>
      <div>
		
			<div id="imglogo">
				<a href="/"><img src="/img/sun.png" alt="Here. There." title="Here. There."/></a>
			</div>
			
			<div id="textlogo">
				<h1 class="site-name"><a href="/" title="Here. There.">Here. There.</a></h1>
				<h2 class="blog-motto">Love ice cream. Love sunshine. Love life. Love the world. Love myself. Love you.</h2>
			</div>
			<div class="navbar"><a class="navbutton navmobile" href="#" title="菜单">
			</a></div>
			<nav class="animated">
				<ul>
					
						<li><a href="/">首页</a></li>
					
						<li><a href="https://github.com/godbasin/godbasin.github.io">所有文章</a></li>
					
						<li><a href="/archives">归档</a></li>
					
						<li><a href="/categories">分类</a></li>
					
						<li><a href="https://godbasin.github.io/front-end-playground">前端游乐场</a></li>
					
						<li><a href="/about">关于我</a></li>
					
				</ul>
			</nav>			
</div>

    </header>
    <div id="container">
      <div id="main" class="post" itemscope itemprop="blogPost">
	<article itemprop="articleBody"> 
		<header class="article-info clearfix">
  <h1 itemprop="name">
    
      <a href="/2019/08/15/wxapp-latest-20190815/" title="小程序开发月刊第八期（20190815）" itemprop="url">小程序开发月刊第八期（20190815）</a>
  </h1>
  <p class="article-author">By
    
      <a href="https://godbasin.github.io" title="被删">被删</a>
    </p>
  <p class="article-time">
    <time datetime="2019-08-15T15:56:33.000Z" itemprop="datePublished">2019-08-15</time>
    更新日期:<time datetime="2019-08-18T06:40:02.862Z" itemprop="dateModified">2019-08-18</time>
    
  </p>
</header>
	<div class="article-content">
		
		
		<div id="toc" class="toc-article">
			<strong class="toc-title">文章目录</strong>
		<ol class="toc"><li class="toc-item toc-level-1"><a class="toc-link" href="#小程序-latest"><span class="toc-number">1.</span> <span class="toc-text">小程序 latest</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#小程序能力"><span class="toc-number">1.1.</span> <span class="toc-text">小程序能力</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#微信-PC-版小程序开发者公测"><span class="toc-number">1.1.1.</span> <span class="toc-text">微信 PC 版小程序开发者公测</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#小程序-vue-多端支持"><span class="toc-number">1.1.2.</span> <span class="toc-text">小程序 vue 多端支持</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#小程序扩展能力提供"><span class="toc-number">1.1.3.</span> <span class="toc-text">小程序扩展能力提供</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#微信卡券“网页链接跳转”能力即将下线"><span class="toc-number">1.1.4.</span> <span class="toc-text">微信卡券“网页链接跳转”能力即将下线</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#「微信开放社区」小程序更新、搜索能力优化、支持扫码分享"><span class="toc-number">1.1.5.</span> <span class="toc-text">「微信开放社区」小程序更新、搜索能力优化、支持扫码分享</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#更新日志"><span class="toc-number">1.1.6.</span> <span class="toc-text">更新日志</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#小程序·云开发"><span class="toc-number">1.2.</span> <span class="toc-text">小程序·云开发</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#小程序·云开发支持第三方平台代开发"><span class="toc-number">1.2.1.</span> <span class="toc-text">小程序·云开发支持第三方平台代开发</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#开发者工具"><span class="toc-number">1.3.</span> <span class="toc-text">开发者工具</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#小程序支持自动化测试"><span class="toc-number">1.3.1.</span> <span class="toc-text">小程序支持自动化测试</span></a></li></ol></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#小程序教程"><span class="toc-number">2.</span> <span class="toc-text">小程序教程</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#社区精选文章"><span class="toc-number">2.1.</span> <span class="toc-text">社区精选文章</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#最新踩坑-amp-amp-Tips"><span class="toc-number">2.2.</span> <span class="toc-text">最新踩坑 && Tips</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#【踩坑信息】-小程序跳小程序闪退"><span class="toc-number">2.2.1.</span> <span class="toc-text">【踩坑信息】- 小程序跳小程序闪退</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#【开发Tips】-开发者工具增强编译"><span class="toc-number">2.2.2.</span> <span class="toc-text">【开发Tips】- 开发者工具增强编译</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#【官方建设】-weui-wxss-v2-0-版本"><span class="toc-number">2.2.3.</span> <span class="toc-text">【官方建设】- weui-wxss v2.0 版本</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#【踩坑信息】-小程序下拉的背景颜色"><span class="toc-number">2.2.4.</span> <span class="toc-text">【踩坑信息】- 小程序下拉的背景颜色</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#【踩坑信息】-PC-版小程序-cookie"><span class="toc-number">2.2.5.</span> <span class="toc-text">【踩坑信息】 - PC 版小程序 cookie</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#【开发Tips】-小程序参数长度"><span class="toc-number">2.2.6.</span> <span class="toc-text">【开发Tips】- 小程序参数长度</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#【踩坑信息】-input"><span class="toc-number">2.2.7.</span> <span class="toc-text">【踩坑信息】- input</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#结束语"><span class="toc-number">2.3.</span> <span class="toc-text">结束语</span></a></li></ol></li></ol>
		</div>
		
		<p>热闹的八月份来了~~<br><a id="more"></a></p>
<h1 id="小程序-latest"><a href="#小程序-latest" class="headerlink" title="小程序 latest"></a>小程序 latest</h1><h2 id="小程序能力"><a href="#小程序能力" class="headerlink" title="小程序能力"></a>小程序能力</h2><h3 id="微信-PC-版小程序开发者公测"><a href="#微信-PC-版小程序开发者公测" class="headerlink" title="微信 PC 版小程序开发者公测"></a>微信 PC 版小程序开发者公测</h3><p>微信 PC 版新版本中，支持打开聊天中分享的小程序，开发者可下载安装微信 PC 版内测版本进行体验和适配。最新版微信开发者工具新增支持在微信 PC 版中预览小程序。</p>
<ul>
<li><a href="https://developers.weixin.qq.com/miniprogram/dev/devtools/pc-dev.html" target="_blank" rel="external">查看详情</a></li>
<li><a href="https://dldir1.qq.com/weixin/Windows/WeChat2.7.0_beta.exe" target="_blank" rel="external">微信 PC 版内测版</a></li>
<li><a href="https://developers.weixin.qq.com/miniprogram/dev/devtools/nightly.html" target="_blank" rel="external">微信开发者工具</a></li>
</ul>
<blockquote>
<p>噢？公测第一天我就踩出一个坑了，可以看看文章底部的最新踩坑 &amp;&amp; Tips。</p>
</blockquote>
<h3 id="小程序-vue-多端支持"><a href="#小程序-vue-多端支持" class="headerlink" title="小程序 vue 多端支持"></a>小程序 vue 多端支持</h3><p>小程序团队推出了小程序 Vue 多端（目前支持微信小程序 + web）方案，已经在我们“微信开放社区”的小程序和 web 落地。</p>
<ul>
<li><a href="https://github.com/wechat-miniprogram/kbone" target="_blank" rel="external">kbone 文档</a></li>
</ul>
<h3 id="小程序扩展能力提供"><a href="#小程序扩展能力提供" class="headerlink" title="小程序扩展能力提供"></a>小程序扩展能力提供</h3><p>官方提供了一些扩展能力（包括扩展UI组件、多端方案kbone、工具库、官方插件等等），希望可以帮大家一起快速搭建小程序。</p>
<ul>
<li><a href="https://developers.weixin.qq.com/miniprogram/dev/extended/" target="_blank" rel="external">查看详情</a></li>
</ul>
<h3 id="微信卡券“网页链接跳转”能力即将下线"><a href="#微信卡券“网页链接跳转”能力即将下线" class="headerlink" title="微信卡券“网页链接跳转”能力即将下线"></a>微信卡券“网页链接跳转”能力即将下线</h3><p>为了确保微信生态良性发展，微信卡券将于2019年8月13日下线网页链接跳转能力。下线后，卡券创建流程中，“自定义入口”与“卡券详情&gt;立即使用跳转”不再支持跳转至网页配置，你可尝试使用跳转小程序作为替代。本次调整仅针对券，会员卡原有能力暂时不变。</p>
<ul>
<li><a href="https://developers.weixin.qq.com/community/develop/doc/0006cef80b05f8b09fe87e70c5fc01" target="_blank" rel="external">帖子详情查看</a></li>
</ul>
<h3 id="「微信开放社区」小程序更新、搜索能力优化、支持扫码分享"><a href="#「微信开放社区」小程序更新、搜索能力优化、支持扫码分享" class="headerlink" title="「微信开放社区」小程序更新、搜索能力优化、支持扫码分享"></a>「微信开放社区」小程序更新、搜索能力优化、支持扫码分享</h3><ul>
<li>小程序更新：社区小程序部分版块已支持完整的阅读、评论与回复功能，欢迎扫码体验。</li>
<li>搜索能力优化：大幅度优化搜索结果匹配度，并支持对搜索结果的内容类型、排序方式、时间范围进行二次筛选。</li>
<li>支持扫码分享：社区公告、文章、问答等内容支持在页面底部“复制链接”或在扫码打开小程序进行分享。</li>
</ul>
<blockquote>
<p>这个微信开放社区小程序，是用 kbone 多端支持做的噢~</p>
</blockquote>
<h3 id="更新日志"><a href="#更新日志" class="headerlink" title="更新日志"></a>更新日志</h3><ul>
<li><a href="https://developers.weixin.qq.com/community/develop/doc/000402b383c3303803f8e16145bc01" target="_blank" rel="external">社区问题反馈以及功能优化更新（07.22-07.26）</a>  </li>
<li><a href="https://developers.weixin.qq.com/community/develop/doc/0008464a59c0f8b468e834c7451c01" target="_blank" rel="external">社区问题反馈以及功能优化更新（07.08-07.19）</a>  </li>
</ul>
<h2 id="小程序·云开发"><a href="#小程序·云开发" class="headerlink" title="小程序·云开发"></a>小程序·云开发</h2><h3 id="小程序·云开发支持第三方平台代开发"><a href="#小程序·云开发支持第三方平台代开发" class="headerlink" title="小程序·云开发支持第三方平台代开发"></a>小程序·云开发支持第三方平台代开发</h3><p>小程序·云开发目前已支持第三方平台代开发。第三方平台可在小程序权限集中勾选云开发管理权限，并通知小程序进行云开发权限集授权。授权完成后即可进行代开发，具体开发过程可参考<a href="https://developers.weixin.qq.com/miniprogram/dev/devtools/ext.html" target="_blank" rel="external">第三方平台代开发</a>。</p>
<p>同时，为方便第三方平台进行代开发，云开发还提供了多种 API 接口，包括开通云开发、创建云环境以及创建云函数等。详见<a href="https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&amp;t=resource/res_list&amp;verify=1&amp;id=21565259008XrkFz&amp;token=&amp;lang=zh_CN" target="_blank" rel="external">云开发接入指南</a>。</p>
<h2 id="开发者工具"><a href="#开发者工具" class="headerlink" title="开发者工具"></a>开发者工具</h2><h3 id="小程序支持自动化测试"><a href="#小程序支持自动化测试" class="headerlink" title="小程序支持自动化测试"></a>小程序支持自动化测试</h3><p><a href="http://npmjs.org/package/miniprogram-automator" target="_blank" rel="external">小程序自动化 SDK</a> 为开发者提供了一套通过外部脚本操控小程序的方案，从而实现小程序自动化测试的目的。</p>
<p>如果你之前使用过 <a href="https://www.seleniumhq.org/projects/webdriver/" target="_blank" rel="external">Selenium WebDriver</a> 或者 <a href="https://pptr.dev/" target="_blank" rel="external">Puppeteer</a>，那你可以很容易快速上手。小程序自动化 SDK 与它们的工作原理是类似的，主要区别在于控制对象由浏览器换成了小程序。</p>
<ul>
<li>更多详情，点击查看<a href="https://developers.weixin.qq.com/miniprogram/dev/devtools/auto/quick-start.html" target="_blank" rel="external">小程序自动化快速开始</a></li>
</ul>
<p>该能力于<a href="https://developers.weixin.qq.com/community/develop/doc/000c085a7244b092e4e8237b451c01" target="_blank" rel="external">开发者工具预发布版 1.02.1907301</a> 支持。</p>
<blockquote>
<p>期待测试用例录制功能，特别想要！</p>
</blockquote>
<h1 id="小程序教程"><a href="#小程序教程" class="headerlink" title="小程序教程"></a>小程序教程</h1><h2 id="社区精选文章"><a href="#社区精选文章" class="headerlink" title="社区精选文章"></a>社区精选文章</h2><ul>
<li><a href="https://developers.weixin.qq.com/community/develop/article/doc/0000a8d54acaf0c962e820a1a5e413" target="_blank" rel="external">让小程序页面和自定义组件支持 computed 和 watch 数据监听器</a></li>
</ul>
<p>更多可以查看<a href="https://developers.weixin.qq.com/community/develop/article" target="_blank" rel="external">文章分享</a>。</p>
<blockquote>
<p>最近社区的好文有点不够哇</p>
</blockquote>
<h2 id="最新踩坑-amp-amp-Tips"><a href="#最新踩坑-amp-amp-Tips" class="headerlink" title="最新踩坑 &amp;&amp; Tips"></a>最新踩坑 &amp;&amp; Tips</h2><h3 id="【踩坑信息】-小程序跳小程序闪退"><a href="#【踩坑信息】-小程序跳小程序闪退" class="headerlink" title="【踩坑信息】- 小程序跳小程序闪退"></a>【踩坑信息】- 小程序跳小程序闪退</h3><p>接口：wx.navigateToMiniProgram<br>问题描述：小程序 A 开发版 -&gt; 小程序 B 正式版 -&gt; 小程序 A 正式版（闪退）<br>小程序跳转间需要注意版本：</p>
<ol>
<li>开发 - 跳正式 - 跳正式，是行不通的 </li>
<li>要么正式 - 跳正式 - 跳正式，要么是开发/体验 - 跳开发/体验 - 跳开发/体验</li>
</ol>
<ul>
<li>文档说明：envVersion 如果当前小程序是正式版，则打开的小程序必定是正式版。</li>
<li>参考：<a href="https://developers.weixin.qq.com/miniprogram/dev/api/open-api/miniprogram-navigate/wx.navigateToMiniProgram.html" target="_blank" rel="external">https://developers.weixin.qq.com/miniprogram/dev/api/open-api/miniprogram-navigate/wx.navigateToMiniProgram.html</a></li>
</ul>
<h3 id="【开发Tips】-开发者工具增强编译"><a href="#【开发Tips】-开发者工具增强编译" class="headerlink" title="【开发Tips】- 开发者工具增强编译"></a>【开发Tips】- 开发者工具增强编译</h3><p>开发者工具ES6转ES5，支持Object.keys，Object.entries和Object.values 是ES2017的内容，需要单独引入polyfill。可以使用开发者工具的增强编译</p>
<ul>
<li><a href="https://developers.weixin.qq.com/miniprogram/dev/devtools/codecompile.html" target="_blank" rel="external">参考</a></li>
</ul>
<h3 id="【官方建设】-weui-wxss-v2-0-版本"><a href="#【官方建设】-weui-wxss-v2-0-版本" class="headerlink" title="【官方建设】- weui-wxss v2.0 版本"></a>【官方建设】- weui-wxss v2.0 版本</h3><p>微信客户端 7.0 开始，UI 界面进行了大改版。小程序也进行了基础组件的样式升级。app.json 中配置 “style”: “v2”可表明启用新版的组件样式。</p>
<ul>
<li><a href="https://developers.weixin.qq.com/miniprogram/dev/reference/configuration/app.html#style" target="_blank" rel="external">参考</a></li>
<li>兼容性：对于2.8.0以下版本基础库，会自动降级为旧版本UI，包括button icon radio checkbox switch slider 等</li>
</ul>
<h3 id="【踩坑信息】-小程序下拉的背景颜色"><a href="#【踩坑信息】-小程序下拉的背景颜色" class="headerlink" title="【踩坑信息】- 小程序下拉的背景颜色"></a>【踩坑信息】- 小程序下拉的背景颜色</h3><ul>
<li>背景：小程序下拉的背景颜色，在iOS下分成backgroundColor、backgroundColorTop、backgroundColorBottom三个部分，而在安卓下需要设置backgroundColor。旧版的小程序开发工具中，为了兼容安卓，会把 backgroundColorTop 的值设到 backgroundColor 的配置上。<br>但这种做法和文档不一致（<a href="https://developers.weixin.qq.com/community/develop/doc/0002847bf0c368d623d8f90ba51c00" target="_blank" rel="external">相关反馈查看</a>），所以新版的工具去掉了这个逻辑，可能导致部分背景样式与之前不一致的问题，开发者若依赖了工具的兼容，后续需要自行进行兼容。</li>
<li>兼容方法：如果需要设置安卓的背景色只能使用 backgroundColor 来设置整个背景色为某个颜色。</li>
</ul>
<h3 id="【踩坑信息】-PC-版小程序-cookie"><a href="#【踩坑信息】-PC-版小程序-cookie" class="headerlink" title="【踩坑信息】 - PC 版小程序 cookie"></a>【踩坑信息】 - PC 版小程序 cookie</h3><p>PC 版小程序中，接口请求多个set-cookie会被合并，只有最后一个会生效。可能会导致登录态丢失的问题，小程序团队已修复。</p>
<h3 id="【开发Tips】-小程序参数长度"><a href="#【开发Tips】-小程序参数长度" class="headerlink" title="【开发Tips】- 小程序参数长度"></a>【开发Tips】- 小程序参数长度</h3><p>关于小程序参数长度限制的说明如下：</p>
<ol>
<li>scene 相关。<ul>
<li>scene 值作为小程序的场景值参数，在小程序生命周期中属于全局变量，一般为 4 位数整型，如：scene=1001。<a href="https://developers.weixin.qq.com/miniprogram/dev/reference/scene-list.html" target="_blank" rel="external">文档参考</a>。</li>
<li>scene 值会作为 query 参数传递给小程序/小游戏。用户扫描该码进入小程序/小游戏后，开发者可以获取到二维码中的 scene 值并做处理逻辑，一般为32位长度限制； 如：<code>pages/sign/subject/subject?scene=1665290702232</code>。<a href="https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/qr-code/wxacode.getUnlimited.html" target="_blank" rel="external">文档参考</a>。</li>
</ul>
</li>
<li>url后面的query参数目前没有长度限制.</li>
</ol>
<ul>
<li>如：pages/index/index/index?key=28383989394949494….</li>
<li><a href="https://developers.weixin.qq.com/miniprogram/dev/api/route/wx.reLaunch.html#%E5%8F%82%E6%95%B0" target="_blank" rel="external">文档参考</a></li>
</ul>
<h3 id="【踩坑信息】-input"><a href="#【踩坑信息】-input" class="headerlink" title="【踩坑信息】- input"></a>【踩坑信息】- input</h3><p><a href="https://developers.weixin.qq.com/miniprogram/dev/component/input.html" target="_blank" rel="external">input 组件</a>的 bindkeyboardheightchange 方法，在<code>Android &amp;&amp; type !==text</code>的情况下，返回的 height 是错误的。可以用 bindfocus 方法，bindfocus 在 1.9.90 版本后加上了 height 字段，返回了键盘的高度。</p>
<h2 id="结束语"><a href="#结束语" class="headerlink" title="结束语"></a>结束语</h2><p>如果你想富有，请把自己变成一个小孩。因为小孩子的框框最少，他们诚实、快乐、乐于学习。 –《小狗钱钱》</p>
  
		
		<p style="margin-top:50px;">
			查看Github有更多内容噢：<a href="https://github.com/godbasin">https://github.com/godbasin</a>
			<br>
			更欢迎来<a href="https://godbasin.github.io/front-end-playground">被删的前端游乐场</a>边撸猫边学前端噢
		</p>
	</div>
	<img src="https://github-imglib-1255459943.cos.ap-chengdu.myqcloud.com/2code2.jpg" width="200" height="200" style="display:block;margin: 0 auto;" />
	<p style="text-align: center;margin-top: 10px;margin-bottom: 20px;">码生艰难，写文不易，给我家猪囤点猫粮了喵~</p>
	<div class="author-right">
  		<p>作者：被删</p>
  		<p>出处：<a href="https://godbasin.github.io">https://godbasin.github.io</a></p>
  		<p>本文版权归作者所有，欢迎转载，但未经作者同意必须保留此段声明，且在文章页面明显位置给出原文连接，否则保留追究法律责任的权利。</p>
	</div>
		<footer class="article-footer clearfix">

  <div class="article-tags">
  
  <span></span> <a href="/tags/教程/">教程</a>
  </div>


<div class="article-categories">
  <span></span>
  <a class="article-category-link" href="/categories/小程序双皮奶/">小程序双皮奶</a>
</div>



<div class="article-share" id="share">

  
<!-- JiaThis Button BEGIN -->
<div class="jiathis_style_24x24">
	<a class="jiathis_button_qzone"></a>
	<a class="jiathis_button_tsina"></a>
	<a class="jiathis_button_tqq"></a>
	<a class="jiathis_button_weixin"></a>
	<a class="jiathis_button_renren"></a>
	<a href="http://www.jiathis.com/share?uid=2134021" class="jiathis jiathis_txt jtico jtico_jiathis" target="_blank"></a>
</div>
<script type="text/javascript">
var jiathis_config = {data_track_clickback:'true'};
</script>
<script type="text/javascript" src="http://v3.jiathis.com/code_mini/jia.js?uid=2134021" charset="utf-8"></script>
<!-- JiaThis Button END -->   


</div>
</footer>   	       
	</article>
	
<nav class="article-nav clearfix">
 
 <div class="prev" >
 <a href="/2019/09/16/wxapp-latest-20190916/" title="小程序开发月刊第九期（20190916）">
  <strong>PREVIOUS:</strong><br/>
  <span>
  小程序开发月刊第九期（20190916）</span>
</a>
</div>


<div class="next">
<a href="/2019/07/27/front-end-playground/"  title="被删的前端游乐场建成！">
 <strong>NEXT:</strong><br/> 
 <span>被删的前端游乐场建成！
</span>
</a>
</div>

</nav>

	<!-- 如果不是首页且没使用 `comments: false` 关闭评论，则尝试加载评论 -->

    <!-- 配置中启用多说时，导入相应代码 -->
    


</div>  
      <div class="openaside"><a class="navbutton" href="#" title="显示侧边栏"></a></div>

  <div id="toc" class="toc-aside">
  <strong class="toc-title">文章目录</strong>
  <ol class="toc"><li class="toc-item toc-level-1"><a class="toc-link" href="#小程序-latest"><span class="toc-number">1.</span> <span class="toc-text">小程序 latest</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#小程序能力"><span class="toc-number">1.1.</span> <span class="toc-text">小程序能力</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#微信-PC-版小程序开发者公测"><span class="toc-number">1.1.1.</span> <span class="toc-text">微信 PC 版小程序开发者公测</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#小程序-vue-多端支持"><span class="toc-number">1.1.2.</span> <span class="toc-text">小程序 vue 多端支持</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#小程序扩展能力提供"><span class="toc-number">1.1.3.</span> <span class="toc-text">小程序扩展能力提供</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#微信卡券“网页链接跳转”能力即将下线"><span class="toc-number">1.1.4.</span> <span class="toc-text">微信卡券“网页链接跳转”能力即将下线</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#「微信开放社区」小程序更新、搜索能力优化、支持扫码分享"><span class="toc-number">1.1.5.</span> <span class="toc-text">「微信开放社区」小程序更新、搜索能力优化、支持扫码分享</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#更新日志"><span class="toc-number">1.1.6.</span> <span class="toc-text">更新日志</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#小程序·云开发"><span class="toc-number">1.2.</span> <span class="toc-text">小程序·云开发</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#小程序·云开发支持第三方平台代开发"><span class="toc-number">1.2.1.</span> <span class="toc-text">小程序·云开发支持第三方平台代开发</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#开发者工具"><span class="toc-number">1.3.</span> <span class="toc-text">开发者工具</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#小程序支持自动化测试"><span class="toc-number">1.3.1.</span> <span class="toc-text">小程序支持自动化测试</span></a></li></ol></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#小程序教程"><span class="toc-number">2.</span> <span class="toc-text">小程序教程</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#社区精选文章"><span class="toc-number">2.1.</span> <span class="toc-text">社区精选文章</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#最新踩坑-amp-amp-Tips"><span class="toc-number">2.2.</span> <span class="toc-text">最新踩坑 && Tips</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#【踩坑信息】-小程序跳小程序闪退"><span class="toc-number">2.2.1.</span> <span class="toc-text">【踩坑信息】- 小程序跳小程序闪退</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#【开发Tips】-开发者工具增强编译"><span class="toc-number">2.2.2.</span> <span class="toc-text">【开发Tips】- 开发者工具增强编译</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#【官方建设】-weui-wxss-v2-0-版本"><span class="toc-number">2.2.3.</span> <span class="toc-text">【官方建设】- weui-wxss v2.0 版本</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#【踩坑信息】-小程序下拉的背景颜色"><span class="toc-number">2.2.4.</span> <span class="toc-text">【踩坑信息】- 小程序下拉的背景颜色</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#【踩坑信息】-PC-版小程序-cookie"><span class="toc-number">2.2.5.</span> <span class="toc-text">【踩坑信息】 - PC 版小程序 cookie</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#【开发Tips】-小程序参数长度"><span class="toc-number">2.2.6.</span> <span class="toc-text">【开发Tips】- 小程序参数长度</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#【踩坑信息】-input"><span class="toc-number">2.2.7.</span> <span class="toc-text">【踩坑信息】- input</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#结束语"><span class="toc-number">2.3.</span> <span class="toc-text">结束语</span></a></li></ol></li></ol>
  </div>

<div id="asidepart">
<div class="closeaside"><a class="closebutton" href="#" title="隐藏侧边栏"></a></div>
<aside class="clearfix">

  	
	<div class="archiveslist">
		<p class="asidetitle">最近文章</p>
			<ul class="archive-list">
			
					
				<li class="archive-list-item">
					<a class="archive-list-link" href="/2019/11/15/wxapp-latest-20191115/" title="小程序开发月刊第11期（20191115）">小程序开发月刊第11期（201911...</a>
				</li>
				
			
					
				<li class="archive-list-item">
					<a class="archive-list-link" href="/2019/11/10/change-log/" title="前端 CHANGELOG 生成指南">前端 CHANGELOG 生成指南...</a>
				</li>
				
			
					
				<li class="archive-list-item">
					<a class="archive-list-link" href="/2019/11/09/wxapp-global-data-behavior/" title="小程序的奇技淫巧 -- globalDataBehavior管理全局状态">小程序的奇技淫巧 -- global...</a>
				</li>
				
			
					
				<li class="archive-list-item">
					<a class="archive-list-link" href="/2019/10/15/wxapp-latest-20191015/" title="小程序开发月刊第十期（20191015）">小程序开发月刊第十期（2019101...</a>
				</li>
				
			
					
				<li class="archive-list-item">
					<a class="archive-list-link" href="/2019/10/13/about-front-end-3-growth/" title="前端这几年--3.关于成长和焦虑">前端这几年--3.关于成长和焦虑...</a>
				</li>
				
			
					
				<li class="archive-list-item">
					<a class="archive-list-link" href="/2019/09/16/wxapp-latest-20190916/" title="小程序开发月刊第九期（20190916）">小程序开发月刊第九期（2019091...</a>
				</li>
				
			
					
				<li class="archive-list-item">
					<a class="archive-list-link" href="/2019/08/15/wxapp-latest-20190815/" title="小程序开发月刊第八期（20190815）">小程序开发月刊第八期（2019081...</a>
				</li>
				
			
					
				<li class="archive-list-item">
					<a class="archive-list-link" href="/2019/07/27/front-end-playground/" title="被删的前端游乐场建成！">被删的前端游乐场建成！</a>
				</li>
				
			
					
				<li class="archive-list-item">
					<a class="archive-list-link" href="/2019/07/21/vue-for-everyone-3/" title="9102全员学Vue--3.把页面拼成个Web应用">9102全员学Vue--3.把页面拼...</a>
				</li>
				
			
					
				<li class="archive-list-item">
					<a class="archive-list-link" href="/2019/07/15/wxapp-latest-20190715/" title="小程序开发月刊第七期（20190715）">小程序开发月刊第七期（2019071...</a>
				</li>
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
			</ul>
	</div>


  
  <div class="archiveslist">
    <p class="asidetitle"><a href="/archives">归档</a></p>
      <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/11/">十一月 2019</a><span class="archive-list-count">3</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/10/">十月 2019</a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/09/">九月 2019</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/08/">八月 2019</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/07/">七月 2019</a><span class="archive-list-count">4</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/06/">六月 2019</a><span class="archive-list-count">4</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/05/">五月 2019</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/04/">四月 2019</a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/03/">三月 2019</a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/02/">二月 2019</a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/01/">一月 2019</a><span class="archive-list-count">3</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/12/">十二月 2018</a><span class="archive-list-count">4</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/11/">十一月 2018</a><span class="archive-list-count">4</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/10/">十月 2018</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/09/">九月 2018</a><span class="archive-list-count">3</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/08/">八月 2018</a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/07/">七月 2018</a><span class="archive-list-count">3</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/06/">六月 2018</a><span class="archive-list-count">3</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/05/">五月 2018</a><span class="archive-list-count">5</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/04/">四月 2018</a><span class="archive-list-count">4</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/03/">三月 2018</a><span class="archive-list-count">7</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/02/">二月 2018</a><span class="archive-list-count">4</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/01/">一月 2018</a><span class="archive-list-count">9</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/12/">十二月 2017</a><span class="archive-list-count">5</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/11/">十一月 2017</a><span class="archive-list-count">3</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/10/">十月 2017</a><span class="archive-list-count">5</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/09/">九月 2017</a><span class="archive-list-count">6</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/08/">八月 2017</a><span class="archive-list-count">11</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/07/">七月 2017</a><span class="archive-list-count">9</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/06/">六月 2017</a><span class="archive-list-count">10</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/05/">五月 2017</a><span class="archive-list-count">15</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/04/">四月 2017</a><span class="archive-list-count">7</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/03/">三月 2017</a><span class="archive-list-count">10</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/02/">二月 2017</a><span class="archive-list-count">41</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/01/">一月 2017</a><span class="archive-list-count">6</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/12/">十二月 2016</a><span class="archive-list-count">7</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/11/">十一月 2016</a><span class="archive-list-count">9</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/10/">十月 2016</a><span class="archive-list-count">5</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/09/">九月 2016</a><span class="archive-list-count">7</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/08/">八月 2016</a><span class="archive-list-count">9</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/07/">七月 2016</a><span class="archive-list-count">14</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/06/">六月 2016</a><span class="archive-list-count">9</span></li></ul>
  </div>


  
<div class="archiveslist">
	<p class="asidetitle"><a href="/categories">分类</a></p>
		<ul class="archive-list">
		
			<li class="archive-list-item">
				<a class="archive-list-link" href="/categories/CSS炒饭/" title="CSS炒饭">CSS炒饭<sup>3</sup></a>
			</li>
		
			<li class="archive-list-item">
				<a class="archive-list-link" href="/categories/D3小馒头/" title="D3小馒头">D3小馒头<sup>8</sup></a>
			</li>
		
			<li class="archive-list-item">
				<a class="archive-list-link" href="/categories/angular2火锅/" title="angular2火锅">angular2火锅<sup>25</sup></a>
			</li>
		
			<li class="archive-list-item">
				<a class="archive-list-link" href="/categories/angular混搭/" title="angular混搭">angular混搭<sup>33</sup></a>
			</li>
		
			<li class="archive-list-item">
				<a class="archive-list-link" href="/categories/box2djs方糖/" title="box2djs方糖">box2djs方糖<sup>34</sup></a>
			</li>
		
			<li class="archive-list-item">
				<a class="archive-list-link" href="/categories/cyclejs哈根达斯/" title="cyclejs哈根达斯">cyclejs哈根达斯<sup>8</sup></a>
			</li>
		
			<li class="archive-list-item">
				<a class="archive-list-link" href="/categories/jQuery杂烩/" title="jQuery杂烩">jQuery杂烩<sup>3</sup></a>
			</li>
		
			<li class="archive-list-item">
				<a class="archive-list-link" href="/categories/js什锦/" title="js什锦">js什锦<sup>26</sup></a>
			</li>
		
			<li class="archive-list-item">
				<a class="archive-list-link" href="/categories/react沙拉/" title="react沙拉">react沙拉<sup>16</sup></a>
			</li>
		
			<li class="archive-list-item">
				<a class="archive-list-link" href="/categories/three-js奶茶/" title="three.js奶茶">three.js奶茶<sup>5</sup></a>
			</li>
		
			<li class="archive-list-item">
				<a class="archive-list-link" href="/categories/vue八宝粥/" title="vue八宝粥">vue八宝粥<sup>29</sup></a>
			</li>
		
			<li class="archive-list-item">
				<a class="archive-list-link" href="/categories/webpack宾治/" title="webpack宾治">webpack宾治<sup>9</sup></a>
			</li>
		
			<li class="archive-list-item">
				<a class="archive-list-link" href="/categories/web乱炖/" title="web乱炖">web乱炖<sup>2</sup></a>
			</li>
		
			<li class="archive-list-item">
				<a class="archive-list-link" href="/categories/前端满汉全席/" title="前端满汉全席">前端满汉全席<sup>8</sup></a>
			</li>
		
			<li class="archive-list-item">
				<a class="archive-list-link" href="/categories/喵/" title="喵">喵<sup>2</sup></a>
			</li>
		
			<li class="archive-list-item">
				<a class="archive-list-link" href="/categories/小程序双皮奶/" title="小程序双皮奶">小程序双皮奶<sup>27</sup></a>
			</li>
		
			<li class="archive-list-item">
				<a class="archive-list-link" href="/categories/工作这杯茶/" title="工作这杯茶">工作这杯茶<sup>5</sup></a>
			</li>
		
			<li class="archive-list-item">
				<a class="archive-list-link" href="/categories/应用巧克力盒/" title="应用巧克力盒">应用巧克力盒<sup>2</sup></a>
			</li>
		
			<li class="archive-list-item">
				<a class="archive-list-link" href="/categories/思想棉花糖/" title="思想棉花糖">思想棉花糖<sup>8</sup></a>
			</li>
		
			<li class="archive-list-item">
				<a class="archive-list-link" href="/categories/柴米油盐工具集/" title="柴米油盐工具集">柴米油盐工具集<sup>1</sup></a>
			</li>
		
			<li class="archive-list-item">
				<a class="archive-list-link" href="/categories/自动化甜筒/" title="自动化甜筒">自动化甜筒<sup>1</sup></a>
			</li>
		
			<li class="archive-list-item">
				<a class="archive-list-link" href="/categories/非前端钙片/" title="非前端钙片">非前端钙片<sup>7</sup></a>
			</li>
		
		</ul>
</div>


  
<div class="archiveslist">
	<p class="asidetitle">标签</p>
		<ul class="archive-list">
		
			<li class="archive-list-item">
				<a class="archive-list-link" href="/tags/分享/" title="分享">分享<sup>44</sup></a>
			</li>
		
			<li class="archive-list-item">
				<a class="archive-list-link" href="/tags/原创部件/" title="原创部件">原创部件<sup>1</sup></a>
			</li>
		
			<li class="archive-list-item">
				<a class="archive-list-link" href="/tags/心态/" title="心态">心态<sup>5</sup></a>
			</li>
		
			<li class="archive-list-item">
				<a class="archive-list-link" href="/tags/教程/" title="教程">教程<sup>73</sup></a>
			</li>
		
			<li class="archive-list-item">
				<a class="archive-list-link" href="/tags/晒猫/" title="晒猫">晒猫<sup>2</sup></a>
			</li>
		
			<li class="archive-list-item">
				<a class="archive-list-link" href="/tags/笔记/" title="笔记">笔记<sup>121</sup></a>
			</li>
		
			<li class="archive-list-item">
				<a class="archive-list-link" href="/tags/算法/" title="算法">算法<sup>9</sup></a>
			</li>
		
			<li class="archive-list-item">
				<a class="archive-list-link" href="/tags/自制插件/" title="自制插件">自制插件<sup>2</sup></a>
			</li>
		
			<li class="archive-list-item">
				<a class="archive-list-link" href="/tags/逻辑实现/" title="逻辑实现">逻辑实现<sup>5</sup></a>
			</li>
		
		</ul>
</div>


    <div class="archiveslist">
    <p class="asidetitle"><a href="/archives">about</a></p>
      <ul class="archive-list">
      	<li class="archive-list-item">
      		<a>wangbeishan@163.com</a>
      		<a href="https://github.com/godbasin">github.com/godbasin</a>
      	</li>
      </ul>
  </div>

  <div class="rsspart">
	<a href="/atom.xml" target="_blank" title="rss">RSS 订阅</a>
</div>

</aside>
</div>
    </div>
    <footer><div id="footer" >
	
	<section class="info">
		<p> 即使梦想再小，却很伟大 ^_^ </p>
	</section>
	 
		<p class="copyright">Powered by <a href="http://hexo.io" target="_blank" title="hexo">hexo</a> and Theme by <a href="https://github.com/A-limon/pacman" target="_blank" title="Pacman">Pacman</a> © 2019 
		
		<a href="https://godbasin.github.io" target="_blank" title="被删">被删</a>
		
		</p>
</div>
</footer>
    <script src="/js/jquery-2.1.0.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){ 
  $('.navbar').click(function(){
    $('header nav').toggleClass('shownav');
  });
  var myWidth = 0;
  function getSize(){
    if( typeof( window.innerWidth ) == 'number' ) {
      myWidth = window.innerWidth;
    } else if( document.documentElement && document.documentElement.clientWidth) {
      myWidth = document.documentElement.clientWidth;
    };
  };
  var m = $('#main'),
      a = $('#asidepart'),
      c = $('.closeaside'),
      o = $('.openaside');
  $(window).resize(function(){
    getSize(); 
    if (myWidth >= 1024) {
      $('header nav').removeClass('shownav');
    }else
    {
      m.removeClass('moveMain');
      a.css('display', 'block').removeClass('fadeOut');
      o.css('display', 'none');
      
      $('#toc.toc-aside').css('display', 'none');
        
    }
  });
  c.click(function(){
    a.addClass('fadeOut').css('display', 'none');
    o.css('display', 'block').addClass('fadeIn');
    m.addClass('moveMain');
  });
  o.click(function(){
    o.css('display', 'none').removeClass('beforeFadeIn');
    a.css('display', 'block').removeClass('fadeOut').addClass('fadeIn');      
    m.removeClass('moveMain');
  });
  $(window).scroll(function(){
    o.css("top",Math.max(80,260-$(this).scrollTop()));
  });
});
</script>

<script type="text/javascript">
$(document).ready(function(){ 
  var ai = $('.article-content>iframe'),
      ae = $('.article-content>embed'),
      t  = $('#toc'),
      h  = $('article h2')
      ah = $('article h2'),
      ta = $('#toc.toc-aside'),
      o  = $('.openaside'),
      c  = $('.closeaside');
  if(ai.length>0){
    ai.wrap('<div class="video-container" />');
  };
  if(ae.length>0){
   ae.wrap('<div class="video-container" />');
  };
  if(ah.length==0){
    t.css('display','none');
  }else{
    c.click(function(){
      ta.css('display', 'block').addClass('fadeIn');
    });
    o.click(function(){
      ta.css('display', 'none');
    });
    $(window).scroll(function(){
      ta.css("top",Math.max(140,320-$(this).scrollTop()));
    });
  };
});
</script>







  </body>
</html>
